<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
</head>
<style>
    .box{
        width: 400px;
        height: 400px;
        border: 1px solid black;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    img{
        width: 200px;
        height: 200px;
    }
</style>
<body>
    <div id="app">
        <div class="box">
            <div> <button v-show="begin>0" @click="fu(-1)">上一页</button></div>
            <img :src="ImgUrl[begin]" alt="">
            <div><button v-show="begin<4" @click="fu(1)">下一页</button></div>
         </div>
    </div>
</body>
<script>
   const app=new Vue({
    el:'#app',
    data:{
       begin:0,
       ImgUrl:["imgs/11-01.gif","imgs/11-02.gif","imgs/11-03.gif","imgs/11-04.png","imgs/11-05.png"]
    },
    methods: {
        fu(num){
            this.begin+=num;
         

        }
    }
   })
</script>
</html>